import java.util.Scanner;

public class Test2 {
    //统计1到N中，除了1和自身以外，至少还能被两个数整除的数字
    public static void main(String[] args) {
        int allCount=0;
        Scanner scan=new Scanner(System.in);
        System.out.println("请输入N的值：");
        int N=scan.nextInt();
        for (int i = 1; i <=N; i++) {
            int count=0;
            for (int j=2;j<i;j++){
                if(i%j==0){
                    count++;
                }
            }
            if(count>=2){
                System.out.print(i+" ");
                allCount++;
            }
        }
        System.out.println();
        System.out.println("allCount的个数为：");
        System.out.println(allCount);
    }
}
